#ifndef WEIGHTED_RESAMPLER_H__CMU_
#define WEIGHTED_RESAMPLER_H__CMU_

#include "resampler.h"

#include <string>
#include <vector>
using namespace std;

class pair_sampler_sorted;

class weighted_resampler : public resampler {
public :
	virtual bool resample_problem(boosting_problem & prob, double * d_t, int & argc, char **& argv, boosting_problem & selected_prob);
	virtual void destroy_problem(boosting_problem & prob);
	virtual ~weighted_resampler(){}
protected:
	virtual int weighted_resample(double * y, boosting_node ** x, int l, double * d, int size, double * yo, boosting_node ** xo);
	virtual pair_sampler_sorted * get_pair_sampler_sorted();
};

class weighted_once_resampler : public weighted_resampler {
public:
	~weighted_once_resampler(){}
protected:
	virtual pair_sampler_sorted * get_pair_sampler_sorted();
};

#endif